package com.zmn.oms.persistence.interfaces.refund;

import com.zmn.oms.model.entity.refund.OrderWorkRefund;
import java.util.List;
import org.apache.ibatis.annotations.Param;

/** 
 * 类描述：退款记录
 * @author  lujia
 * @date   2018-12-18 20:58:52
 */
public interface OrderWorkRefundDao {

    /**
     * 通过 订单Id查询退款记录
     * @param orderId 订单Id
     * @param workId 工单Id
     * @return
     */
    List<OrderWorkRefund> findOrderWorkRefundByOrderIdAndWorkId(@Param("orderId") Long orderId, @Param("workId") Long workId);

    /**
     * 保存
     * @param record
     * @return
     */
    int insertOrderWorkRefund(OrderWorkRefund record);

    /**
     * 修改
     * @param record
     * @return
     */
    int updateByRefundId(OrderWorkRefund record);

    /**
     * 删除订单
     * @param orderId
     * @param refundId
     * @return
     */
    int deleteOrderWorkRefund(@Param("orderId") Long orderId, @Param("refundId") Long refundId);
}